home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / pdcurs21.zip / PORTABLE.ZIP / SCROLLOK.C < prev    next >
Text File  |  1992-11-21  |  2KB  |  51 lines

  1. #define        CURSES_LIBRARY  1
  2. #include <curses.h>
  3. #undef scrollok
  4.  
  5. #ifndef        NDEBUG
  6. char *rcsid_scrollok = "$Header: c:/curses/portable/RCS/scrollok.c%v 2.0 1992/11/15 03:29:31 MH Rel $";
  7. #endif
  8.  
  9.  
  10.  
  11.  
  12.  
  13. /*man-start*********************************************************************
  14.  
  15.   scrollok()   - scrollok window
  16.  
  17.   X/Open Description:
  18.        This function controls what happens when the cursor of a window
  19.        is moved off the edge of the window or scrolling region, either
  20.        from a newline on the bottom line or by typing the last character
  21.        of the last line.  If the option is disabled, the cursor is left
  22.        on the bottom line.  If enabled, the window is scrolled up one
  23.        line and then refreshed.
  24.  
  25.   PDCurses Description:
  26.        This is also implemented as a macro.
  27.  
  28.   X/Open Return Value:
  29.        The scrollok() function returns OK on success otherwise ERR
  30.        is returned.
  31.  
  32.   PDCurses Errors:
  33.        It is an error to pass a NULL* window.
  34.  
  35.   Portability:
  36.        PDCurses        int scrollok( WINDOW* win, bool bf );
  37.        X/Open Dec '88  int scrollok( WINDOW* win, bool bf );
  38.        SysV Curses     int scrollok( WINDOW* win, bool bf );
  39.        BSD Curses      int scrollok( WINDOW* win, bool bf );
  40.  
  41. **man-end**********************************************************************/
  42.  
  43. int    scrollok(WINDOW *win, bool bf)
  44. {
  45.        if  (win == (WINDOW *)NULL)
  46.                return( ERR );
  47.  
  48.        win->_scroll    = bf;
  49.        return( OK );
  50. }
  51.